﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;
using Mani.Common;
using Ghasam.Business.Services;

public partial class Accounts : BasePage {
    
    public override string ActionName {
        get {
            return "vw_accounts";
        }
    }

    private IInternalAccountService internalAccountService;
    public IInternalAccountService InternalAccountService
    {
        get { return internalAccountService; }
        set { internalAccountService = value; }
    }

    protected void btnCreate_Click( object sender, EventArgs e ) {

        try {

            InternalAccountService.InternalAccountSaveOrUpadate(txtAccountName.Text, 0, txtDescription.Text, DateTime.Now.Date, DateTime.Now.Date);
            UIHelper.ClientAlert( "حساب جدید با موفقیت ایجاد شد" );
            gvAccounts.DataBind();
        }
        catch {
            throw;
        }
    }
}
